package com.yykj.base.client.feign;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.yykj.base.client.dto.*;
import com.yykj.base.client.dto.template.ConsultationTemplateDTO;
import com.yykj.base.client.dto.template.ConsultationTemplateFieldDTO;
import com.yykj.base.client.dto.template.ConsultationTemplateFieldListDTO;
import com.yykj.base.client.dto.template.FormFieldDTO;
import com.yykj.common.vo.ResultVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "base-server")
public interface BaseFeignClient {

    @ApiOperation("地区列表")
    @GetMapping("/api/base/area/list")
    public ResultVO<List<AreaDTO>> listAllArea(@RequestParam(name = "parentCode",required = false) String parentCode);

    @ApiOperation("医院级别")
    @GetMapping("/api/base/hospital/level")
    ResultVO<List<String>> getHospitalLevel();

    @GetMapping("/api/proto/base/department")
    List<BaseDepartmentDTO> getBaseDepartment();


    @ApiOperation("修改默认科室")
    @PostMapping("/api/proto/base/department/edit")
    BaseDepartmentDTO editBaseDepartment(@RequestBody BaseDepartmentDTO dto);

    @ApiOperation("添加默认科室")
    @ApiOperationSupport(ignoreParameters = { "id" })
    @PostMapping("/api/proto/base/department/add")
    BaseDepartmentDTO addBaseDepartment(@RequestBody BaseDepartmentDTO dto);

    @ApiOperation("删除默认科室")
    @DeleteMapping("/api/proto/base/department/delete/{id}")
    void deleteBaseDepartment(@PathVariable(value = "id") Integer id);

    @ApiOperation("职称列表")
    @GetMapping("/api/proto/base/doctor/officer")
    List<BaseOfficerDTO> getBaseOfficer();


    @ApiOperation("获取汉字的拼音码和五笔码")
    @GetMapping("/api/proto/base/word/brief/info/{word}")
    WordBriefInfo getWordBriefInfo(@PathVariable(value = "word")  String word);

    @ApiOperation("会诊模板 -- 通用字段 -- 添加")
    @PostMapping("/api/proto/base/form/field/edit")
    public FormFieldDTO editFormField(@RequestBody FormFieldDTO dto) ;

    @ApiOperation("会诊模板 -- 通用字段 -- 删除")
    @DeleteMapping("/api/proto/base/form/field/delete/{id}")
    public void deleteFormField(@PathVariable Integer id) ;

    @ApiOperation("会诊模板 -- 通用字段 -- 列表")
    @GetMapping("/api/proto/base/form/field/common/list")
    public List<FormFieldDTO> commonFormFieldList();

    @ApiOperation("会诊模板--添加修改")
    @PostMapping("/api/proto/base/consultation/template/edit")
    public ConsultationTemplateDTO editConsultationTemplate(@RequestBody ConsultationTemplateDTO consultationTemplateDTO);

    @ApiOperation("会诊模板--删除模板")
    @DeleteMapping("/api/proto/base/consultation/template/delete/{id}")
    public void deleteConsultationTemplate(@PathVariable Integer id);

    @ApiOperation("会诊模板--列表")
    @GetMapping("/api/proto/base/consultation/template/list")
    public List<ConsultationTemplateDTO> listConsultationTemplate();

    @ApiOperation("会诊模板--普通字段 -- 添加")
    @PostMapping("/api/proto/base/consultation/template/field/edit")
    public void editConsultationTemplateFields(@RequestBody ConsultationTemplateFieldListDTO listDTO);

    @ApiOperation("会诊模板--普通字段 -- 删除")
    @DeleteMapping("/api/proto/base/consultation/template/field/delete/{id}")
    public void deleteConsultationTemplateFields(@PathVariable Integer id);

    @ApiOperation("会诊模板 -- 字段列表")
    @PostMapping("/api/proto/base/consultation/template/field/list/{id}")
    public List<ConsultationTemplateFieldDTO> listConsultationTemplateFields(@PathVariable Integer id);

}
